{capture name=path}{l s='Opinion'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}

<h1>{l s='Wyraź swoją opinię o naszym sklepie'}</h1>


<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std">
    <fieldset class="contact-form">
        {if $success}<div class="success">{$success}</div>{/if}
        {if $write_error}<div class="error">{$write_error}</div>{/if}
        
        <p class="text">
            {if $opinion_errors.opinion_name}<div class="opinion_error">{$opinion_errors.opinion_name}</div>{/if}
            <label for="opinion_name">{l s='Imię'}</label>
            <input type="text" id="opinion_name" name="opinion_name" value="{$opinion.name|escape:'htmlall':'UTF-8'}" />
        </p>         
        {if $opinion_errors.opinion_rating}<div class="opinion_error">{$opinion_errors.opinion_rating}</div>{/if}
        <div class="rating_stars">        
            <label for="opinion_rating">{l s='Ocena sklepu'}</label>
            <input name="opinion_rating" type="radio" value="1" class="star"/>
            <input name="opinion_rating" type="radio" value="2" class="star"/>
            <input name="opinion_rating" type="radio" value="3" class="star"/>
            <input name="opinion_rating" type="radio" value="4" class="star"/>
            <input name="opinion_rating" type="radio" value="5" class="star"/>
        </div>   
                
        <p class="textarea">
            {if $opinion_errors.opinion_message}<div class="opinion_error">{$opinion_errors.opinion_message}</div>{/if}
            <label for="opinion_message">{l s='Treść'}</label>
            <textarea id="opinion_message" name="opinion_message" rows="15" cols="20" style="width:340px;height:220px">{if isset($opinion.message)}{$opinion.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>
        </p>
        <p class="submit">
            <input type="submit" name="save_opinion" id="submitMessage" value="{l s='Wyślij'}" class="button_large" onclick="$(this).hide();" />
        </p>
    </fieldset>
</form>
        <script type="text/javascript">
$(function(){ // wait for document to load
$('input.star').rating();
});            
        </script>